package com.zcs.app.lucky

import android.os.Build
import android.os.StrictMode
import android.os.StrictMode.VmPolicy
import cn.sxw.android.base.ui.BaseApplication
import cn.sxw.android.base.utils.JLogUtil
import com.tencent.mmkv.MMKV

class CustomApplication : BaseApplication() {
    override fun onCreate() {
        super.onCreate()
        /**
         * TODO 解决android7.0以上版本传递URI问题
         * @Modify by zzy@sxw.cn on 2018/2/8
         */
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
            val builder = VmPolicy.Builder()
            StrictMode.setVmPolicy(builder.build())
        }
        initMMKV()
    }

    private fun initMMKV() {
        JLogUtil.d("MMKV", "初始化MMKV")
        MMKV.initialize(this)
    }
}